/* loading */
.layadmin-loading-parent-relative {
  position: relative !important;
}

.layadmin-loading-parent-hidden {
  overflow: hidden !important;
}

.layadmin-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -16px -15px;
  font-size: 30px;
}

/* Popup */
.layadmin-view-popup {
  color: $text-color;
  // min-width: 290px;
  animation-timing-function: ease-out;
  box-shadow: 0 5px 15px rgba($color-black, 0.5);

  .layui-layer-title {
    height: $view-popup-height;
    line-height: $view-popup-height;
    border: 0;
    font-size: 18px;
    background-color:$color-white;
  }

  .layui-layer-content {
    padding: 20px;
    line-height: 22px;

    cite {
      font-style: normal;
      font-weight: 500;
      color: $color-red;
    }

    ins {
      word-break: break-all;
    }

    &.layadmin-layer-content {
      padding-left: 60px;
    }
  }

  .layui-layer-setwin {
    @extend %display-none;
  }

  i[close] {
    position: absolute;
    padding: 5px;
    right: 15px;
    top: 12px;
    font-weight: 700;
    cursor: pointer;

    &:hover {
      color: $color-primary;
    }
  }

  .layui-btn {
    line-height: 30px;
    height: 30px;
    padding: 0 15px;
  }

  &-btn-container {
    padding: 15px;
    text-align: right;
  }

  &-status {
    position: absolute;
    top: 18px;
    left: 20px;
    display: block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 24px;
    border-radius: 24px;
    background-color: transparent;

    .layui-icon {
      font-size: 20px;
    }

    &.is-success {
      background-color: $color-green;
      color: color-yiq($color-green);
    }

    &.is-error {
      background-color: $color-red;
      color: color-yiq($color-red);
    }

    &.is-warning {
      background-color: $color-orange;
      color: color-yiq($color-orange);
    }

    &.is-info {
      background-color: $text-active-color;
      color: color-yiq($text-active-color);
    }
  }

  .layadmin-btn-confirm {
    background-color: $color-primary;
  }

  .layadmin-btn-cancel {
    border: 1px solid $border-color;
    background-color: $color-white;
    color: $text-color;

    &:hover {
      background-color: $color-gray-f600;
    }
  }

  &.layui-layer-iframe {
    .layui-layer-content {
      padding: 0;
    }
  }

  &.layadmin-view-popup-broadcast {
    top: 400px !important;
    bottom: 0;
    border-radius: 0;
  }

  &.layadmin-view-popup-popupright {
    top: 0 !important;
    bottom: 0;
    border-radius: 0;
    overflow: auto;
    box-shadow: 1px 1px 10px rgba($color-black, 0.1);
  }

  &.layadmin-view-popup-logout {
    .layadmin-btn-confirm {
      background-color: $view-popup-logout-theme;
    }
  }
}


// 默认动画
@include anim(SlideDown) {
  from {
    transform: translate(0, 0);
    opacity: .3;
  }
  to {
    transform: translate(0, 40px);
    opacity: 1;
  }
}

@include anim(SlideUp) {
  from {
    transform: translate(0, 40px);
    opacity: 1;
  }
  to {
    transform: translate(0, 0);
    opacity: .3;
  }
}

.layui-anim-SlideDown {
  animation-name: SlideDown;
}

.layui-anim-SlideDown.layer-anim-close {
  animation-name: SlideUp;
}

// 广播动画
@include anim(Broadcast) {
  from {
    transform: translate3d(0, 100%, 0) ;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@include anim(BroadcastOut) {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, 100%, 0);
  }
}

.layui-anim-Broadcast {
  animation-name: Broadcast;
}

.layui-anim-Broadcast.layer-anim-close {
  animation-name: BroadcastOut;
}


// 右侧动画
@include anim(PopupRight) {
  from {
    transform: translate3d(100%, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@include anim(PopupRightOut) {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(100%, 0, 0);
  }
}

.layui-anim-PopupRight {
  animation-name: PopupRight;
}

.layui-anim-PopupRight.layer-anim-close {
  animation-name: PopupRightOut;
}

// TODO 记得挪走

.layadmin-view-popup .layui-layer-content .layui-tab {
  margin: 0;

  @extend %full;

  .layui-tab-content {
    width: 100%;
    height: calc(100% - 40px);
    padding: 0;
  }

  .layui-tab-item,
  .layui-tab-item iframe {
    @extend %full;
  }
}